@extends('admin.layout')
@section('content')

<!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                商品图片管理
                <small>编辑</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 后台主页</a></li>
                <li><a href="#">商品图片管理</a></li>
                <li class="active">编辑</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速编辑商品图片</h3>
                        </div><!-- /.box-header -->

                        
                        <!-- form start -->
                        <form role="form" action="{{ url('/admin/goodsimgs/update') }}" method="post" enctype="multipart/form-data">
                        {{csrf_field()}}
                        <input type="hidden" name="id" value="{{ $data -> id}}" >
                            <div class="box-body">

                                <div class="form-group">
                                    <label for="exampleInputUsername">商品类别ID</label>
                                    <input type="text" name="cate_id" value="{{ $data -> cate_id }}" class="form-control" id="exampleInputUsername"
                                           placeholder="请输入商品名">
                                </div>

                                <div class="form-group">
                                    <label for="exampleInputFile">原始商品图片</label><br/>
                                    <img src="{{ $data -> goodsimgs }}" width="200" />
                                    <p class="help-block">原始商品图片</p>
                                </div>
                                
                                <div class="form-group">
                                    <label for="exampleInputFile">上传新商品图片</label><br/>
                                    <input type="file" name="goodsimgs" id="exampleInputFile">
                                    <p class="help-block">请选择一张图片作为商品图片</p>
                                </div>

                                <div class="form-group">
                                    <label for="exampleInputFile">原始商标</label><br/>
                                    <img src="{{ $data -> goodsbrands }}" width="200" />
                                    <p class="help-block">原始商标</p>
                                </div>
                                
                                <div class="form-group">
                                    <label for="exampleInputFile">上传新商标</label><br/>
                                    <input type="file" name="goodsbrands" id="exampleInputFile">
                                    <p class="help-block">请选择一张图片作为商标</p>
                                </div>

                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">更新</button>
                                <button type="reset" class="btn btn-default">重置</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                <!-- right column -->
                </div><!--/.col (right) -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->

@endsection